/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.model.generators;

import java.awt.Color;
import java.util.ArrayList;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Point;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.shapes.Polygon;

/**H and VCenterDelta are not set - default is 0,0
 *
 * @author Admin
 */
public class ModelPolygonGenerator extends ModelPolylineGenerator{
    public static Polygon generatePolygon(double rotation,double anchorX,double anchorY,
            double opacity,double borderWidth,Color borderColor,Color fill,ArrayList<Point> points){
        Polygon res = new Polygon();
        res.setRotation(rotation);
        res.setOpacity(opacity);
        res.setBorderWidth(borderWidth);
        res.setBorderColor(borderColor);
        res.setFillColor(fill);
        for(Point p : points){
            res.addPoint(p);
        }
        
        return res;
    }
}
